import java.util.List;
import java.util.LinkedList;

class ConDiaCClass{
    private List<EBNFClass> ebnfs;
    private List<GLCClass> glcs;
    private List<Operation> operations;
    
    public ConDiaCClass(){
	this.ebnfs=new LinkedList<EBNFClass>();
	this.glcs=new LinkedList<GLCClass>();
	this.operations=new LinkedList<Operation>();
    }

    public ConDiaCClass(List<EBNFClass> ebnfs, List<GLCClass> glcs, List<Operation> operations){
	this.ebnfs=ebnfs;
	this.glcs=glcs;
	this.operations=operations;
    }

    public List<EBNFClass> getEBNFs(){
	return this.ebnfs;
    }

    public List<GLCClass> getGLCs(){
	return this.glcs;
    }

    public List<Operation> getOperations(){
	return this.operations;
    }

    public void addEBNF(EBNFClass e){
	this.ebnfs.add(e);
    }

    public void addGLC(GLCClass g){
	this.glcs.add(g);
    }

    public void addOperation(Operation o){
	this.operations.add(o);
    }

    public void addOperations(ConDiaCClass cdc){
	for(int i=0;i<cdc.getOperations().size();i++)
	    this.operations.add(cdc.getOperations().get(i));
    }

    @Override public String toString(){
	String sebnf="",sglc="",sop="";
	for(int i=0;i<getEBNFs().size();i++)
	    sebnf+=getEBNFs().get(i).toString();
	for(int i=0;i<getGLCs().size();i++)
	    sglc+=getGLCs().get(i).toString();
	for(int i=0;i<getOperations().size();i++)
	    sop+=getOperations().get(i).toString();
	return "EBNFs:\n"+sebnf+"GLCs:\n"+sglc+"Operations:\n"+sop;
    }
	
}